package org.example.jcclubsubjectinfra.basic.service.impl;

import org.example.jcclubsubjectinfra.basic.entity.SubjectCategory;
import org.example.jcclubsubjectinfra.basic.mapper.SubjectCategoryDao;
import org.example.jcclubsubjectinfra.basic.service.SubjectCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * @author 啊昌
 * @date 2025/4/12 10:12
 * SubjectCategoryServiceimpl 题目分类表(SubjectCategory)表服务实现类
 */
@Service("subjectCategoryService")
public class SubjectCategoryServiceImpl implements SubjectCategoryService {

	@Resource
	private SubjectCategoryDao subjectCategoryDao;

	@Override
	public Boolean insert(SubjectCategory subjectCategory) {
		return subjectCategoryDao.insert(subjectCategory)>0;
	}

	@Override
	public List<SubjectCategory> queryPrimaryCategory(SubjectCategory subjectCategory) {
		return subjectCategoryDao.queryCategory(subjectCategory);
	}
}
